﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinFormsApp1
{
    public class CommonRelation
    {
        public string id { get; set; }
        public string type { get; set; }
        public string startNode { get; set; }
        public string endNode {  get; set; }
        public string startNodeType {  get; set; }
        public string endNodeType { get; set; }
        public Dictionary<string, string> properties { get; set; } = new Dictionary<string, string>();

        internal string ToFormatString(KnowlgeMap m_map)
        {
            var name1 = m_map.GetNodeById(startNode).GetName();
            var name2 = m_map.GetNodeById(endNode).GetName();
            return name1 + "-" + type + "-" + name2;
        }
    }
}
